package com.rms.recruit_management_system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.rms.recruit_management_system.pojo.Positions;
import com.rms.recruit_management_system.vo.PositionVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface PositionVoMapper extends BaseMapper<Positions> {

    @Select("SELECT * FROM positions p left JOIN departments d ON p.department_id = d.department_id WHERE d.department_name = #{departmentName}")
    List<PositionVo> getPositionVo(String departmentName);
}
